#ifndef REVERSI_BOARD_H
#define REVERSI_BOARD_H

#include <vector>
#include <cstdlib>
using std::vector;

#include <QBitArray>
#include <iostream>

using namespace std;
//This class represents the board of a single player in the game
class ReversiBoard
{
public:
    //int player_color = 0
    ReversiBoard(int player_color = 0);
    void set_piece(int x, int y, bool value);
    bool get_piece(int x, int y);
    void set_player_color(int player_color);
    int get_player_color();
    QBitArray get_board();
    void set_board(ReversiBoard*);
    void set_score(int score);
    unsigned int get_score();

    int *to_array();
    void print();
    //ReversiBoard & operator=(const ReversiBoard &other);


private:
    //The board simply consists of a std vector of bool variables. There is an optimization with
    //a std::vector and bool vars that makes the variables occupy only 1 bit
    //For more info: http://www.cplusplus.com/reference/stl/vector/
    //0 - Represents empty space
    //1 - There is a piece
    QBitArray m_board;
    int m_player_color;
    unsigned int m_score;
};

#endif // REVERSI_BOARD_H
